
package edu.upc.clase.demo.service.impl;

import edu.upc.clase.demo.dao.PersonaDao;
import edu.upc.clase.demo.dao.impl.PersonaDaoImpl;
import edu.upc.clase.demo.entity.Persona;
import edu.upc.clase.demo.entity.Persona;
import edu.upc.clase.demo.service.PersonaService;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;



/**
 *
 * @author dramos
 */

@Service
public class PersonaServiceImpl implements PersonaService {

    private static Logger log = LoggerFactory.getLogger(PersonaDaoImpl.class);  
    
    @Autowired
    private PersonaDao personaDao;
    
    
    @Override
    public Integer insertar(Persona persona) {
        log.info("Creando usuario");
        return personaDao.insertar(persona);
    }

    @Override
    public List<Persona> buscarTodos() {
        return personaDao.buscarTodos();
    }
}
